﻿/************************************************************************/
/* FileName:        GCColor
 * Author:          Aric.W
 * Created:         2013/9/17 16:13:14
 * Version:         A001
 * Compiler:        Visual Studio 2010
 * Description:     
 * 
 * History:
 * <Author>         <Time>              <Version>   <Desc>
 * Aric.W    2013/9/17 16:13:14  A001        create
/************************************************************************/

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;

namespace Common
{
    public struct GCColor
    {
        private int r;

        public int R
        {
            get { return r; }
            set { r = value; }
        }
        private int a;

        public int A
        {
            get { return a; }
            set { a = value; }
        }

        private int g;

        public int G
        {
            get { return g; }
            set { g = value; }
        }
        private int b;

        public int B
        {
            get { return b; }
            set { b = value; }
        }

        #region ... Constructor ...
        /// <summary>
        /// 
        /// </summary>
        /// <param name="a"></param>
        /// <param name="r"></param>
        /// <param name="g"></param>
        /// <param name="b"></param>
        public GCColor(byte a, byte r, byte g, byte b)
        {
            this.a = a;
            this.r = r;
            this.g = g;
            this.b = b;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="r"></param>
        /// <param name="g"></param>
        /// <param name="b"></param>
        public GCColor(byte r, byte g, byte b)
            : this(255, r, g, b)
        {
        }
        #endregion ... Constructor ...

        /// <summary>
        /// 获取该结构体数据对应的Color
        /// </summary>
        /// <returns></returns>
        public Color GetColor()
        {
            return Color.FromArgb(a, r, g, b);
        }

    }//end GCColor
}
